/* eslint-disable */
import React from "react";
import Chart from "echarts-for-react";
import style from "./Echarts_tu.less";
import request from '../../../utils/request';


class Echarts_left4 extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            xianzhi:0,
            indicator:[],
            data:[]
        }



    }

    componentDidMount() {
        request({
            url: `/sx-client/sx/indicator/getProductionPlan`,
            method: 'GET',
        }).then(data => {
            if(data.rc === 0) {
                this.setState({
                    indicator:data.ret.indicator,
                    data:data.ret.data
                })
            }
        })

    }




    setOption = () => {

        return  {

            tooltip: {},
        
            radar: {
                // shape: 'circle',
                name: {
                    textStyle: {
                        color: '#fff',
                        backgroundColor: '#999',
                        borderRadius: 3,
                        padding: [3, 5]
                    }
                },
                indicator: this.state.indicator
            },
            series: [{
               
                type: 'radar',
                // areaStyle: {normal: {}},
                data: this.state.data
            }]
        };



    }

    render() {
        console.log(this.props)
        return (

            <Chart option={this.setOption()} notMerge lazyUpdate 
                style={{ height: '100%' }}
            />




        );
    }

}

export default Echarts_left4;
